package com.jeff.android.lab.module.widget.custom;

import android.os.Handler;
import android.os.Looper;

import com.jeff.android.lab.BaseFragment;
import com.jeff.android.lab.R;
import com.jeff.android.lab.widget.CircularProgress;

import butterknife.BindView;

/**
 * @author: dingfeng
 * @date: 2021/5/17
 * @since: 1.0.0
 **/
public class CustomWidgetFragment extends BaseFragment {

    @BindView(R.id.progress_circular)
    CircularProgress mCircularProgress;

    @Override
    protected int getRootLayout() {
        return R.layout.widget_fragment_custom_view;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public void run() {
                mCircularProgress.setValue(180);
            }
        }, 500);

        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public void run() {
                mCircularProgress.setMaxValue(100);
            }
        }, 3000);

        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public void run() {
                mCircularProgress.setValue(25);
            }
        }, 5000);
    }

}
